package com.visikard.ui.activity;

import android.content.Intent;
import android.os.Bundle;

import com.visikard.application.VKRegApplication;

public abstract class BaseLoginCompleteActivity extends BaseFragmentActivity {

	@Override
	protected void onCreate(Bundle arg0) {
		super.onCreate(arg0);

		// Handle the case app is restart due to a low memory kill
		// relaunch app in case launch from notification while app were killed
		if (VKRegApplication.uid == -1) {
			Intent intent = new Intent(this, SplashScreen.class);
			// Phuoc: Add flag to clear all old activities in case app was killed
			intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);
			startActivity(intent);
			finish();
		}
	}

}
